import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import echarts from './views/charts/echarts.vue'

import purchase from './views/purchase/index';
import inquiry from './views/inquiry/index';
import confirmFrom from './views/confirmFrom/index';
import baseSetting from './views/baseSetting/index';
import buyer from './views/buyer/index';

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '请购及审批',
        iconCls: 'el-icon-shopping-cart-2',//图标样式class
        children: [
            { path: '/purchaseList', component: purchase.purchaseList, name: '请购单列表' },
            { path: '/purchForm', component: purchase.purchForm, name: '请购单' },
            
            // { path: '/depComf', component: purchase.depComf, name: '部门确认单' },
            // { path: '/compComf', component: purchase.compComf, name: '公司确认单' },
            { path: '/main', component: Main, name: '首页', hidden: true },

            // { path: '/form', component: Form, name: '新增请购单'},
            // { path: '/user', component: user, name: '列表' },
        ]
    },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '',
    //     iconCls: 'el-icon-notebook-1',
    //     leaf: true,//只有一个节点
    //     children: [
    //         { path: '/summary', component: inquiry.summary, name: '汇总采购表' },
    //     ],
    // },
    {
        path: '/',
        component: Home,
        name: '采购询价',
        iconCls: 'el-icon-folder-opened',
        children: [
            { path: '/inquiryList', component: inquiry.inquiryList, name: '询价单列表' },
            { path: '/inquiryForm', component: inquiry.inquiryForm, name: '询价单' },
            
            // { path: '/priceContrast', component: inquiry.priceContrast, name: '价格对比表'},
            // { path: '/depConfiBuy', component: inquiry.depConfiBuy, name: '部门确认表'},
            // { path: '/ceoComfBuy', component: inquiry.ceoComfBuy, name: '总经办确认表'},

            { path: '/productContrast', component: inquiry.productContrast, name: '产品对比', hidden: true },
            { path: '/myMessage', component: inquiry.myMessage, name: '我的消息', hidden: true },
            // { path: '/priceContrastDetail', component: inquiry.priceContrastDetail, name: '产品价格对比',hidden: true},

        ]
    },
    {
        path: '/',
        component: Home,
        name: '汇总询价',
        iconCls: 'el-icon-tickets',
        // leaf: true,//只有一个节点
        children: [
            { path: '/purSumFormList', component: inquiry.purSumFormList, name: '汇总询价列表' },
            { path: '/purSumList', component: inquiry.purSumList, name: '汇总询价单' },
        ],
    },
    {
        path: '/',
        component: Home,
        name: '总裁审批',
        iconCls: 'el-icon-folder-checked',
        // leaf: true,//只有一个节点
        children: [
            { path: '/depConList', component: confirmFrom.depConList, name: '总裁审批列表' },
            { path: '/department', component: confirmFrom.department, name: '总裁审批单'},
        ],
    },
    
    {
        path: '/',
        component: Home,
        name: '最终采购审批查询',
        iconCls: 'el-icon-edit-outline',
        // leaf: true,//只有一个节点
        children: [
            { path: '/approvalOrderList',component:confirmFrom.approvalOrderList,name:'最终审批单列表'},
            { path: '/approvalOrderDetail',component:confirmFrom.approvalOrderDetail,name:'最终审批单'},
        ],
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'el-icon-document',
        leaf: true,//只有一个节点
        children: [
            // { path: '/supplierList', component: confirmFrom.supplierList, name: '供应商价格本' },
            { path: '/uploadFile',component:baseSetting.uploadFile,name:'采购供应商编辑'},
        ],
    },
    // {
    //     path: '/',
    //     component: Home,
    //     name: '采购表',
    //     iconCls: 'fa fa-address-card',
    //     // leaf: true,//只有一个节点
    //     children: [
    //         { path: '/financeComf', component: confirmFrom.financeComf, name: '财务部确认单' },
    //         { path: '/ceoConfirm', component: confirmFrom.ceoConfirm, name: '总裁确认单' },
    //         { path: '/buyConfirm', component: confirmFrom.buyConfirm, name: '采购确认单' },
    //         { path: '/productIn', component: confirmFrom.productIn, name: '产品入库单' },
    //         { path: '/productOut', component: confirmFrom.productOut, name: '产品出库单' },
    // { path: '/department', component: confirmFrom.department, name: '申请部门确认表' },
    //     ]
    // },
    {
        path: '/',
        component: Home,
        name: '采购订单',
        iconCls: 'el-icon-notebook-2',
        // leaf: true,//只有一个节点
        children: [
            { path: '/purchaseOrderList', component: buyer.purchaseOrderList, name: '订单列表' },
            { path: '/purchaseOrderDetial', component: buyer.purchaseOrderDetial, name: '订单详情'},
        ],
    },
    {
        path: '/',
        component: Home,
        name: '采购员购买',
        iconCls: 'el-icon-shopping-cart-2',
        // leaf: true,//只有一个节点
        children: [
            { path: '/buyOrderList', component: buyer.buyOrderList, name: '购买列表' },
            { path: '/buyOrderDetail', component: buyer.buyOrderDetail, name: '购买详情'},
        ],
    },
    
    {
        path: '/',
        component: Home,
        name: '系统设置',
        iconCls: 'el-icon-setting',
        children: [
            { path: '/handle', component: baseSetting.handle, name: '分配采购权限配置' },
            { path: '/account', component: baseSetting.account, name: '用户设置' },
            { path: '/stationList', component: baseSetting.stationList, name: '岗位设置' },
            { path: '/roleList', component: baseSetting.roleList, name: '角色设置' },
            { path: '/approvalFlow', component: baseSetting.approvalFlow, name: '流程配置' },
            { path: '/menuList',component:baseSetting.menuList,name:'菜单配置'},
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;